﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication.BaseClass
{
    /// <summary>
    /// 公众号消息基类
    /// </summary>
    public class ResponseMessageBase:MessageBase,IResponseMessageBase
    {
        public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.Text; }
        }

    }


    public class ResponseMessageText:ResponseMessageBase,IResponseMessageBase
    {
        new public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.Text; }
        }
        public string Content { get; set; }
    }

    /// <summary>
    /// 回复图片消息
    /// </summary>
    public class ResponseMessageImage:ResponseMessageBase,IResponseMessageBase
    {
        public Image Image { get; set; }
        public ResponseMessageImage()
        {
            Image = new Image();
        }

        new public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.Image; }
        }
    }

    public class Image
    {
        public string MediaID { get; set; }
    }

    /// <summary>
    /// 回复语音消息
    /// </summary>
    public class ResponseMessageVoice:ResponseMessageBase,IResponseMessageBase
    {
        public Voice Voice { get; set; }
        public ResponseMessageVoice()
        {
            Voice = new Voice();
        }
        new public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.Voice; }
        }
    }
    public class Voice
    {
        public string MediaId { get; set; }
    }
    //回复视频消息 
    /// <summary>
    /// 
    /// </summary>
    public class ResponseMessageVideo:ResponseMessageBase,IResponseMessageBase
    {
        public Video Video { get; set; }
        public ResponseMessageVideo()
        {
            Video = new Video();
        }
        new public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.Video; }
        }
    }
    public class Video
    {
        public string MediaId { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
    }

    public class ResponseMessageMusic:ResponseMessageBase,IResponseMessageBase
    {
        public Music Music { get; set; }

        public ResponseMessageMusic()
        {
            Music = new Music();
        }
        public override ResponseMsgType MsgType
        {
            get
            {
                return ResponseMsgType.Music;                                                                                                                                                               
            }
        }

    }
    public class Music
    {
        public string Title { get; set; }
        public string Description { get; set; }
        public string MusicUrl { get; set; }
        public int MyProperty { get; set; }
    }

    public class ResponesMessageNews : ResponseMessageBase, IResponseMessageBase
    {
        public List<Article> Article;
        public ResponesMessageNews()
        {
            Article = new List<Article>();
        }
        new public virtual ResponseMsgType MsgType
        {
            get { return ResponseMsgType.News; }
        }

        public int ArticleCount
        {
            get { return (Article ?? new List<Article>()).Count; }
            set { }
        }

        /// <summary>
        /// 文章列表，微信客户端只能输出前10条（可能未来数字会有变化，出于视觉效果考虑，建议控制在8条以内）
        /// </summary>
        public List<Article> Articles { get; set; }
    }

    public class Article
    {
        public string Title { get; set; }
        public string Description { get; set; }
        public string picUrl { get; set; }
        public string Url { get; set; }
    }

}